$(document).ready(function(){
	var dan=0;
	$('.menu').bind('mouseover',function(){
			this.style.backgroundImage='url(newimages/hover.png)';
	});
	$('.menu').bind('mouseout',function(){
		$(this).removeClass('hoverie');
		this.style.backgroundImage='';
	});
	$('.toprightmax').bind('mouseover',function(){
		if(!+[1,]){	
			$(this).addClass('maxie2');
		}else{
			this.style.backgroundImage='url(newimages/max2.png)';
		}
	});
	$('.toprightmax').bind('mouseout',function(){
		if(!+[1,]){	
			$(this).removeClass('maxie2');
			$(this).addClass('maxie');
		}else{
			this.style.backgroundImage='url(newimages/max.png)';
		}
	});
	$('.toprightmin').bind('mouseover',function(){
		if(!+[1,]){	
			$(this).addClass('minie2');
		}else{
			this.style.backgroundImage='url(newimages/min2.png)';
		}
		
	});
	$('.toprightmin').bind('mouseout',function(){
		if(!+[1,]){	
			$(this).removeClass('minie2');
			$(this).addClass('minie');
		}else{
			this.style.backgroundImage='url(newimages/min.png)';
		}
	});
	$('.toprightclose').bind('mouseover',function(){
		if(!+[1,]){	
			$(this).addClass('closeie2');
		}else{
			this.style.backgroundImage='url(newimages/close2.png)';
		}
	});
	$('.toprightclose').bind('mouseout',function(){
		if(!+[1,]){	
			$(this).removeClass('closeie2');
			$(this).addClass('closeie');
		}else{
			this.style.backgroundImage='url(newimages/close.png)';
		}
	});
	
});


var PIXELGIF="images/blank.gif";

var arVersion = navigator.appVersion.split("MSIE");
var version = parseFloat(arVersion[1]);
var pngxp=/\.png$/i;
var AlphaPNGfix= "progid:DXImageTransform.Microsoft.AlphaImageLoader";
function fixPNGAll() {
         if(!document.all) return;
         if ((version >= 5.5 && version < 7) && (document.body.filters)) {
           for(var i=0; i<document.images.length; i++) {
                 var img = document.images[i];
                 if(img.src && pngxp.test(img.src)) {
                   var imgName = img.src;
                   var imgID = (img.id) ? "id='" + img.id + "' " : "";
                   var imgClass = (img.className) ? "class='" + img.className + "' " : "";
                   var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
                   var imgStyle = "display:inline-block;" + img.style.cssText;
                   if (img.align == "left") imgStyle = "float:left;" + imgStyle;
                   if (img.align == "right") imgStyle = "float:right;" + imgStyle;
                   if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
                   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                   + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
                   + "filter:" +AlphaPNGfix
                   + "(src='" + img.src + "', sizingMethod='scale');\"></span>";
                   if (img.useMap) {
                         strNewHTML += "<img style=\"position:relative; left:-" + img.width + "px;"
                         + "height:" + img.height + "px;width:" + img.width +"\" "
                         + "src=\"" + PIXELGIF + "\" usemap=\"" + img.useMap 
                         + "\" border=\"" + img.border + "\">";
                   }
                   img.outerHTML = strNewHTML;
                   i--;
                 }
           }
           var kmax = document.forms.length;
           for(var k=0; k<kmax; k++) {
                 var fmob = document.forms[k];
                 var elmarr = fmob.getElementsByTagName("input");
                 var jmax = elmarr.length;
                 for(var j=0; j<jmax; j++) {
                         var elmob = elmarr[j];
                         if(elmob && elmob.type=="image" && pngxp.test(elmob.src)) {
                                 var origsrc = elmob.src;
                                 elmob.src = PIXELGIF;
                                 elmob.style.filter = AlphaPNGfix+"(src='" +origsrc +"')";
                         }
                 }
           }
         }
}

